﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Bilgesoft.Framework.Server.DatabaseLayer
{
    internal class CustomContext : DbContext
    {
        private static CustomContext sm_context;
        public static CustomContext CreateContext(string connection)
        {
            if (sm_context == null)
                sm_context = new CustomContext(connection);
            return sm_context;
        }
        private CustomContext(string connection)
            : base(connection)
        {
            InitializeSettings();
        }

        public void InitializeSettings()
        {
            this.Configuration.LazyLoadingEnabled = false;

            /*
             * Set configurations
             * 
             * **/


        }
       
    }
}
